<template>
  <el-select v-model="userSet" clearable placeholder="请选择">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value"
      sortable/>
  </el-select>
</template>

<script>
import { userType } from '@/model/'
export default {
  name: 'UserType',
  props: {
    value: {
      type: String,
      default: 'new_user'
    }
  },
  data() {
    return {
      userSet: this.value,
      options: userType
    }
  },
  watch: {
    userSet() {
      this.$emit('input', this.userSet)
    }
  }
}
</script>
